package com.xiaomi.baidumap.favorite.model;

import com.google.gson.annotations.SerializedName;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Created by Administrator on 16-9-1.
 */
@DatabaseTable(tableName = "local_repo")
public class LocalRepo {


    /*
    * "id": 892275,
    "name": "retrofit",
    "full_name": "square/retrofit",
    "description": "Type-safe HTTP client for Android and Java by Square, Inc.",
    "stargazers_count": 13283,
    "forks_count": 2656,
    "avatar_url": "https://avatars.githubusercontent.com/u/82592?v=3",
    "group":{
    "id": 1,
    "name": "网络连接"
  }
    *
    * */
    public static final String GROUP_ID = "group";

    @DatabaseField(id = true)
    private int id;
    @DatabaseField
    private String name;
    @DatabaseField(columnName = "fullName")
    @SerializedName("full_name")
    private String fullName;
    @DatabaseField
    private String description;
    @DatabaseField(columnName = "starts")
    @SerializedName("stargazers_count")
    private int startsCount;
    @DatabaseField
    @SerializedName("avatar_url")
    private String avatar;
    @DatabaseField
    @SerializedName("forks_count")
    private int forksCount;
    //外键，主要的作用是关联另外一张表
    @DatabaseField(foreign = true,columnName = GROUP_ID,canBeNull = true)
    private RepoGroup group;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public int getStartsCount() {
        return startsCount;
    }

    public void setStartsCount(int startsCount) {
        this.startsCount = startsCount;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getForksCount() {
        return forksCount;
    }

    public void setForksCount(int forksCount) {
        this.forksCount = forksCount;
    }

    public RepoGroup getGroup() {
        return group;
    }

    public void setGroup(RepoGroup group) {
        this.group = group;
    }
}
